/*
 * Packet.h
 *
 *  Created on: 19 Jun 2013
 *      Author: Shameegh
 */

#ifndef PACKET_H_
#define PACKET_H_

#include <QObject>
#include <QtNetwork>

class Packet: public QObject
{
	Q_OBJECT
public:
	//Constructors and Destructors
	Packet();
	Packet(QString url);
	virtual ~Packet();

	//Properties
	QString URL;


	//Methods
	void PerformRequest();

signals:
	void OnSuccess(QString response);
	void OnError(QString response);

private:
	//Properties
	QNetworkAccessManager *networkAccessManager;

	//Private Methods
	void Init();

private slots:
	void RequestFinished(QNetworkReply* reply);
};

#endif /* PACKET_H_ */
